package org.csu.newpetstoreback.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import lombok.Data;

import java.math.BigDecimal;

@Data
@TableName("lineitem")
public class OrderItem {

    //联合主键
    @MppMultiId
    @TableField(value = "orderid")
    private int orderId;//key1

    @MppMultiId
    @TableField(value = "linenum")
    private int lineNum;//key2

    @TableField(value = "itemid")
    private String itemId;

    private int quantity;

    @TableField(value = "price")
    private BigDecimal price;//单件商品的单价

}
